home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 6 / QRZ Ham Radio Callsign Database - Volume 6.iso / pc / files / mac / tech_hc.hqx / Technician Ham Test 5.0 SA / background_2725.xml < prev    next >
Encoding:
Extensible Markup Language  |  1995-07-30  |  7.7 KB  |  76 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE background PUBLIC "-//Apple, Inc.//DTD background V 2.0//EN" "" >
  3. <background>
  4.     <id>2725</id>
  5.     <filler1>0</filler1>
  6.     <bitmap>BMAP_3199.pbm</bitmap>
  7.     <cantDelete> <true /> </cantDelete>
  8.     <showPict> <true /> </showPict>
  9.     <dontSearch> <false /> </dontSearch>
  10.     <link rel="stylesheet" type="text/css" href="stylesheet_6393.css" />
  11.     <part>
  12.         <id>1</id>
  13.         <type>button</type>
  14.         <visible> <true /> </visible>
  15.         <reserved5> 0 </reserved5>
  16.         <reserved4> 0 </reserved4>
  17.         <reserved3> 0 </reserved3>
  18.         <reserved2> 0 </reserved2>
  19.         <reserved1> 0 </reserved1>
  20.         <enabled> <true /> </enabled>
  21.         <rect>
  22.             <left>111</left>
  23.             <top>169</top>
  24.             <right>228</right>
  25.             <bottom>309</bottom>
  26.         </rect>
  27.         <style>transparent</style>
  28.         <showName> <false /> </showName>
  29.         <highlight> <false /> </highlight>
  30.         <autoHighlight> <false /> </autoHighlight>
  31.         <sharedHighlight> <true /> </sharedHighlight>
  32.         <family>0</family>
  33.         <titleWidth>0</titleWidth>
  34.         <icon>0</icon>
  35.         <textAlign>center</textAlign>
  36.         <font>Chicago</font>
  37.         <textSize>12</textSize>
  38.         <textStyle>plain</textStyle>
  39.         <name>Exam</name>
  40.         <script>on mouseDown
  41. ask "Please enter your name."
  42. put it into field "user" of card report
  43. -- ΓÇóΓÇóΓÇó change unlimited to # minutes to put a time limit on test
  44. -- be sure to change background of questions and below also.
  45. answer "You have unlimited minutes to take this test" with "OK"
  46. end mouseDown
  47.  
  48. on mouseUp
  49. global time1,score,check2,ok,questlist
  50. set the cursor to 4
  51. put empty into ok
  52. put empty into score
  53. put empty into check2
  54. put empty into field QMissed of card report
  55. get the long time
  56. put it into field "Start" of Card "Report"
  57. convert it to seconds
  58. -- ΓÇóΓÇóΓÇó change 30 in next line to # of minutes desired for time limit
  59. add 30*60 to it
  60. put it into time1
  61. -- put questlist into message -- for debug only
  62. visual effect dissolve to black
  63. visual effect dissolve
  64. -- go card "#1" -- for debug only
  65. get item 1 of questlist
  66. go card it
  67. end mouseUp
  68.  
  69.  
  70.  
  71.  
  72. </script>
  73.     </part>
  74.     <part>
  75.         <id>6</id>
  76.         <type>button</type>
  77.         <visible> <true /> </visible>
  78.         <reserved5> 0 </reserved5>
  79.         <reserved4> 0 </reserved4>
  80.         <reserved3> 0 </reserved3>
  81.         <reserved2> 0 </reserved2>
  82.         <reserved1> 0 </reserved1>
  83.         <enabled> <true /> </enabled>
  84.         <rect>
  85.             <left>9</left>
  86.             <top>13</top>
  87.             <right>55</right>
  88.             <bottom>45</bottom>
  89.         </rect>
  90.         <style>default</style>
  91.         <showName> <true /> </showName>
  92.         <highlight> <false /> </highlight>
  93.         <autoHighlight> <false /> </autoHighlight>
  94.         <sharedHighlight> <false /> </sharedHighlight>
  95.         <family>0</family>
  96.         <titleWidth>0</titleWidth>
  97.         <icon>0</icon>
  98.         <textAlign>center</textAlign>
  99.         <font>Times</font>
  100.         <textSize>12</textSize>
  101.         <textStyle>plain</textStyle>
  102.         <name>QUIT</name>
  103.         <script>on mouseUp
  104. doMenu "Quit HyperCard"
  105. end mouseUp</script>
  106.     </part>
  107.     <name>intro</name>
  108.     <script>on buildList -- ΓÇóΓÇóΓÇó rename to buildList1 if using sequential questions
  109. -- or to buildList if using randomly-generated questions
  110. global questlist,rightone,lockkey,questans,questkey
  111. global sky1, sky2, sky3, sky4, sky5, sky6 -- used for saved ans key
  112. -- initialization
  113. set the cursor to 4
  114. -- ΓÇóΓÇóΓÇóquestgrp contains the number of questions in each question group
  115. -- and is used to generate random questions, one from each group.
  116. -- Note that the question groups MUST BE sequential in order for this
  117. -- to work.  That is, group 1 must be the first 10 questions, group 2
  118. -- must be the next 14 questions, and so on.
  119. put "11,11,11,11,11,18,11,12,11,11," into questgrp
  120. put "11,15,11,11,16,11,11,11,14,11," after questgrp
  121. put "11,11,11,11,11" after questgrp
  122. -- ΓÇóΓÇóΓÇó The number of commas in questans and questkey must be equal to
  123. -- number of questions in each test minus one.  For example, for a
  124. -- 30-question test, there are 29 commas.
  125. put ",,,,,,,,,,,,,,,,,,,,,,,," into questans
  126. put ",,,,,,,,,,,,,,,,,,,,,,,," into questkey
  127. put empty into questlist
  128. put 0 into startgroup
  129. put empty into sky1
  130. put empty into sky2
  131. put empty into sky3
  132. put empty into sky4
  133. put empty into sky5
  134. put empty into sky6
  135. set lockscreen to true
  136. -- generate the questions from subgroups randomly
  137. repeat with i = 1 to number of items of questgrp
  138. put startgroup into thisquest
  139. add the random of item i of questgrp to thisquest
  140. put questlist & "#" & thisquest & "," into questlist
  141. add item i of questgrp to startgroup
  142. end repeat
  143. delete last character of questlist
  144. -- ΓÇóΓÇóΓÇó generate the answer key for these questions.  this currently
  145. -- only handles up to first 51 questions.
  146. repeat with i = 1 to number of items of questlist
  147. if i > 51 then exit repeat
  148. put item i of questlist into thisquest
  149. go to card thisquest
  150. -- ΓÇóΓÇóΓÇó You can put the card # or the subelement #  or question #┬¼
  151. -- as question #in key
  152. put "#" & i into x -- question # option
  153. -- put the short name of this card into x -- card # option
  154. -- put first word of field "Q1" into x -- subelement # option
  155. put first word of field "Q1" into y -- used for answer key
  156. if i < 18 then
  157. put sky1&x&"("&y&")"&return into sky1
  158. put sky2&rightone&return into sky2
  159. else if i < 35 then
  160. put sky3&x&"("&y&")"&return into sky3
  161. put sky4&rightone&return into sky4
  162. else
  163. put sky5&x&"("&y&")"&return into sky5
  164. put sky6&rightone&return into sky6
  165. end if
  166. end repeat
  167. go to card savedscores
  168. put sky1 into field key1
  169. put sky2 into field key2
  170. put sky3 into field key3
  171. put sky4 into field key4
  172. put sky5 into field key5
  173. put sky6 into field key6
  174. -- prevent buildList from being called again immediately
  175. put true into lockkey
  176. go to first card
  177. set lockscreen to false
  178. end buildList
  179.  
  180. on buildList1 -- ΓÇóΓÇóΓÇó rename to buildList for sequential questions or to
  181. -- buildList1 for randomly-generated questions
  182. global questlist,rightone,lockkey,questans,questkey
  183. global sky1, sky2, sky3, sky4, sky5, sky6 -- used for saved ans key
  184. -- initialization
  185. set the cursor to 4
  186. -- ΓÇóΓÇóΓÇó be sure that the group number of each question card matches the
  187. -- question number.  For example, question #1 is group 1, question
  188. -- #2 is group 2, and so on.
  189. put empty into questlist
  190. put empty into questans
  191. put empty into questkey
  192. put empty into sky1
  193. put empty into sky2
  194. put empty into sky3
  195. put empty into sky4
  196. put empty into sky5
  197. put empty into sky6
  198. set lockscreen to true
  199. repeat with i = 1 to number of cards of bkgnd Test
  200. put "#" & i & "," after questlist
  201. put "," after questans
  202. put "," after questkey
  203. end repeat
  204. delete last character of questlist
  205. delete last character of questans
  206. delete last character of questkey
  207. -- ΓÇóΓÇóΓÇó generate the answer key for these questions.  This currently
  208. -- only works for first 32 questions
  209. repeat with i = 1 to number of items of questlist
  210. if i > 51 then exit repeat
  211. put item i of questlist into thisquest
  212. go to card thisquest
  213. -- ΓÇóΓÇóΓÇó You can put the card # or the subelement #  or question # ┬¼
  214. -- as question #in key
  215. -- put "#" & i into x -- question # option
  216. put the short name of this card into x -- card # option
  217. -- put first word of field "Q1" into x -- subelement # option
  218. put first word of field "Q1" into y -- used for answer key
  219. if i < 18 then
  220. put sky1&x&"("&y&")"&return into sky1
  221. put sky2&rightone&return into sky2
  222. else if i < 35 then
  223. put sky3&x&"("&y&")"&return into sky3
  224. put sky4&rightone&return into sky4
  225. else
  226. put sky5&x&"("&y&")"&return into sky5
  227. put sky6&rightone&return into sky6
  228. end if
  229. end repeat
  230. go to card savedscores
  231. put sky1 into field key1
  232. put sky2 into field key2
  233. put sky3 into field key3
  234. put sky4 into field key4
  235. put sky5 into field key5
  236. put sky6 into field key6
  237. -- prevent buildList from being called again immediately
  238. put true into lockkey
  239. go to first card
  240. set lockscreen to false
  241. end buildList1
  242. </script>
  243. </background>
  244.